package org.swingplus.core.bean;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Map;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import org.swingplus.core.factory.AbstractBeanDefinition;
import org.swingplus.core.factory.MutablePropertyValues;
import org.swingplus.core.factory.config.BeanDefinition;

import javax.annotation.Nullable;

/**
 * 类元数据
 */
public class RootBeanDefinition extends AbstractBeanDefinition {
    private String name;
    private String simpleName;
//    private String beanClass;
    
    private Class beanClass;
    private String dependentOn;

    private Field[] fields;
    private Field[] declaredFields;
    private Map<String,Field> fieldsNameMap;

    private BiMap<String,Field> fieldNameMap = HashBiMap.create();

    private int fieldSize;


    private boolean existsAutowired;
    private Field[] autowiredField;
    private int autowiredFieldSize;

    private Annotation[] annotationType;

    private Method[] methods;
    private int methodSize;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSimpleName() {
        return simpleName;
    }

    public void setSimpleName(String simpleName) {
        this.simpleName = simpleName;
    }

    public Field[] getFields() {
        return fields;
    }

    public void setFields(Field[] fields) {
        this.fields = fields;
    }

    public int getFieldSize() {
        return fieldSize;
    }

    public void setFieldSize(int fieldSize) {
        this.fieldSize = fieldSize;
    }

    public boolean getExistsAutowired() {
        return existsAutowired;
    }

    public void setExistsAutowired(boolean existsAutowired) {
        this.existsAutowired = existsAutowired;
    }

    public Field[] getAutowiredField() {
        return autowiredField;
    }

    public void setAutowiredField(Field[] autowiredField) {
        this.autowiredField = autowiredField;
    }

    public int getAutowiredFieldSize() {
        return autowiredFieldSize;
    }

    public void setAutowiredFieldSize(int autowiredFieldSize) {
        this.autowiredFieldSize = autowiredFieldSize;
    }

    public Annotation[] getAnnotationType() {
        return annotationType;
    }

    public void setAnnotationType(Annotation[] annotationType) {
        this.annotationType = annotationType;
    }

    public Method[] getMethods() {
        return methods;
    }

    public void setMethods(Method[] methods) {
        this.methods = methods;
    }

    public int getMethodSize() {
        return methodSize;
    }

    public void setMethodSize(int methodSize) {
        this.methodSize = methodSize;
    }

	public Class getBeanClass() {
		return beanClass;
	}

	public void setBeanClass(Class beanClass) {
		this.beanClass = beanClass;
	}

	public Map<String, Field> getFieldsNameMap() {
		return fieldsNameMap;
	}

	public void setFieldsNameMap(Map<String, Field> fieldsNameMap) {
		this.fieldsNameMap = fieldsNameMap;
	}

	public BiMap<String, Field> getFieldNameMap() {
		return fieldNameMap;
	}

	public void setFieldNameMap(BiMap<String, Field> fieldNameMap) {
		this.fieldNameMap = fieldNameMap;
	}

	public String getDependentOn() {
		return dependentOn;
	}

	public void setDependentOn(String dependentOn) {
		this.dependentOn = dependentOn;
	}

    public Field[] getDeclaredFields() {
        return declaredFields;
    }

    public void setDeclaredFields(Field[] declaredFields) {
        this.declaredFields = declaredFields;
    }

    @Override
    public void setBeanClassName(@Nullable String beanClassName) {

    }

    @Nullable
    @Override
    public String getBeanClassName() {
        return null;
    }

    @Override
    public void setDependsOn(@Nullable String... dependsOn) {

    }

    @Nullable
    @Override
    public String[] getDependsOn() {
        return new String[0];
    }

    @Override
    public void setScope(@Nullable String scope) {

    }

    @Nullable
    @Override
    public String getScope() {
        return null;
    }

    @Override
    public void setAutowireCandidate(boolean autowireCandidate) {

    }

    @Override
    public boolean isAutowireCandidate() {
        return false;
    }

    @Override
    public MutablePropertyValues getPropertyValues() {
        return null;
    }
}
